@prefixCls: ~"c7ncd-template-preview";

.@{prefixCls} {
  padding: 12px;
  padding-bottom: 8px;
  height: fit-content;
  background: rgba(104, 135, 232, 0.08);
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  &-active {
    border: 1px solid var(--primary-color);
  }
  & + & {
    margin-top: 16px;
  }
  > main {
    display: flex;
    margin-top: 10px;
    margin-bottom: 4px;
    overflow: auto;
  }
  > header {
    display: flex;
    align-items: center;
    .c7ncd-templates-selector-menu-item-image-container {
      img {
        height: 18px;
      }
    }
    .@{prefixCls}-name {
      font-size: 13px;
      font-weight: 400;
      color: var(--text-color);
      line-height: 20px;
      margin-left: 8px;
    }
    .@{prefixCls}-tag {
      margin-left: 8px;
    }
  }
  &-stageTmp {
    min-width: 29%;
    height: fit-content;
  }
  &-stageTmp:last-of-type {
    .@{prefixCls}-jobTmp {
      &::before {
        width: 0;
        border: none;
      }
    }
  }
  &-jobTmp {
    height: 32px;
    padding: 0 2px;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-align: center;
    line-height: 32px;
    background: #fff;
    box-shadow: 0 2px 4px 0 rgba(65, 91, 201, 0.12);
    border-radius: 2px;
    display: block;
    > p {
      width: 80%;
      color: rgba(15, 19, 88, 0.65);
      margin: 0 auto;
    }
  }
  &-jobTmp + &-jobTmp {
    margin-top: 10px;
    position: relative;
    &::before {
      content: "";
      position: absolute;
      width: 16px;
      height: 42px;
      border-width: 0 1px 1px 0;
      border-style: solid;
      border-color: #6887e8;
      display: block;
      top: -26px;
      right: -16px;
      border-bottom-right-radius: 4px;
    }
  }
  &-stageTmp + &-stageTmp {
    margin-left: 32px;
    position: relative;
    padding-bottom: 2px;
    &::before {
      position: absolute;
      content: "";
      width: 20%;
      height: 1px;
      display: block;
      background: #6887e8;
      top: 15px;
      margin: auto;
      left: -32px;
    }
  }
}
